package org.dearsor.elective.model;

import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToMany;

@Entity
public class Course {
	
	
	private long id;
	
	private String name;
	
	private Integer score;
	
	private Set<Student> students;
	
	private Set<Teacher> teachers;

	public void setName(String name) {
		this.name = name;
	}

	
	public String getName() {
		return name;
	}

	public void setScore(Integer score) {
		this.score = score;
	}

	
	public Integer getScore() {
		return score;
	}

	public void setStudents(Set<Student> students) {
		this.students = students;
	}

	@ManyToMany(mappedBy = "courses")
	public Set<Student> getStudents() {
		return students;
	}


	public void setTeachers(Set<Teacher> teachers) {
		this.teachers = teachers;
	}


	@ManyToMany(mappedBy = "courses")
	public Set<Teacher> getTeachers() {
		return teachers;
	}


	public void setId(long id) {
		this.id = id;
	}

	@Id @GeneratedValue
	public long getId() {
		return id;
	} 

}
